﻿<!--***********************************************************************************

   Extended WPF Toolkit

   Copyright (C) 2007-2013 Xceed Software Inc.

   This program is provided to you under the terms of the Microsoft Public
   License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license 

   For more features, controls, and fast professional support,
   pick up the Plus Edition at http://xceed.com/wpf_toolkit

   Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids

  **********************************************************************************-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:Xceed.Wpf.DataGrid">

   <SolidColorBrush x:Key="gridControlBorderBrush"
                    Color="Black" />

   <SolidColorBrush x:Key="gridControlBackgroundBrush"
                    Color="Transparent" />

   <SolidColorBrush x:Key="gridControlForegroundBrush"
                    Color="White" />

   <LinearGradientBrush x:Key="errorBackgroundBrush"
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
      <GradientStop Color="#FFF69898"
                    Offset="1" />
      <GradientStop Color="Red" />
   </LinearGradientBrush>

   <SolidColorBrush x:Key="errorForegroundBrush"
                    Color="White" />

   <SolidColorBrush x:Key="dropMarkBrush"
                    Color="#BBFFFFFF" />

   <!--These Brushes are the basic light and dark borders for the controls-->
   <LinearGradientBrush x:Key="basicWhiteBorderBrush"
                        EndPoint="1.11,1.10"
                        StartPoint="-0.03,-0.04">
      <GradientStop Color="White" />
      <GradientStop Offset="1"
                    Color="White" />
      <GradientStop Offset="0.5" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="basicBlackBorderBrush"
                        EndPoint="1.18,1.16"
                        StartPoint="-0.21,-0.19">
      <GradientStop Color="Black"
                    Offset="1" />
      <GradientStop Color="#00000000"
                    Offset="0.47" />
      <GradientStop Color="Black" />
   </LinearGradientBrush>

   <!-- Pen that is used to draw the drop mark when a ColumnHeader is dragged over another one. -->
   <Pen x:Key="dropMarkPen"
        Brush="{StaticResource dropMarkBrush}"
        Thickness="7" />

   <!--**************************
    * TEMPLATE: Button (for GroupByControl bubbles)
    ************************** -->
   <ControlTemplate x:Key="groupByControlBubbleTemplate"
                    TargetType="ContentControl">
      <Grid>
         <Ellipse x:Name="main">
            <Ellipse.Fill>
               <RadialGradientBrush GradientOrigin="0.12,0.725"
                                    RadiusX="0.51"
                                    RadiusY="0.51">
                  <GradientStop Offset="0"
                                Color="White" />
                  <GradientStop Offset="1" />
               </RadialGradientBrush>
            </Ellipse.Fill>
            <Ellipse.Stroke>
               <LinearGradientBrush EndPoint="1.011,0.574"
                                    StartPoint="0.001,0.73">
                  <GradientStop Color="White"
                                Offset="0" />
                  <GradientStop Offset="1" />
               </LinearGradientBrush>
            </Ellipse.Stroke>
         </Ellipse>

         <Ellipse x:Name="drop1"
                  Width="6"
                  HorizontalAlignment="Center"
                  RenderTransformOrigin="0.5,0.5"
                  VerticalAlignment="Center"
                  Height="6"
                  Opacity="0">
            <Ellipse.RenderTransform>
               <TranslateTransform />
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
               <RadialGradientBrush GradientOrigin="0.12,0.725"
                                    RadiusX="0.51"
                                    RadiusY="0.51">
                  <GradientStop Offset="0" />
                  <GradientStop Offset="1"
                                Color="#3FFFFFFF" />
               </RadialGradientBrush>
            </Ellipse.Fill>
            <Ellipse.Stroke>
               <LinearGradientBrush EndPoint="1.011,0.574"
                                    StartPoint="0.001,0.73">
                  <GradientStop Color="#7FFFFFFF"
                                Offset="0" />
                  <GradientStop Offset="1" />
               </LinearGradientBrush>
            </Ellipse.Stroke>
         </Ellipse>
         <Ellipse x:Name="drop2"
                  Width="6"
                  HorizontalAlignment="Center"
                  RenderTransformOrigin="0.5,0.5"
                  VerticalAlignment="Center"
                  Height="6"
                  Opacity="0">
            <Ellipse.RenderTransform>
               <TranslateTransform />
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
               <RadialGradientBrush GradientOrigin="0.12,0.725"
                                    RadiusX="0.51"
                                    RadiusY="0.51">
                  <GradientStop Offset="0" />
                  <GradientStop Offset="1"
                                Color="#3FFFFFFF" />
               </RadialGradientBrush>
            </Ellipse.Fill>
            <Ellipse.Stroke>
               <LinearGradientBrush EndPoint="1.011,0.574"
                                    StartPoint="0.001,0.73">
                  <GradientStop Color="#7FFFFFFF"
                                Offset="0" />
                  <GradientStop Offset="1" />
               </LinearGradientBrush>
            </Ellipse.Stroke>
         </Ellipse>
         <Ellipse x:Name="drop3"
                  Width="6"
                  HorizontalAlignment="Center"
                  RenderTransformOrigin="0.5,0.5"
                  VerticalAlignment="Center"
                  Height="6"
                  Opacity="0">
            <Ellipse.RenderTransform>
               <TranslateTransform />
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
               <RadialGradientBrush GradientOrigin="0.12,0.725"
                                    RadiusX="0.51"
                                    RadiusY="0.51">
                  <GradientStop Offset="0" />
                  <GradientStop Offset="1"
                                Color="#3FFFFFFF" />
               </RadialGradientBrush>
            </Ellipse.Fill>
            <Ellipse.Stroke>
               <LinearGradientBrush EndPoint="1.011,0.574"
                                    StartPoint="0.001,0.73">
                  <GradientStop Color="#7FFFFFFF"
                                Offset="0" />
                  <GradientStop Offset="1" />
               </LinearGradientBrush>
            </Ellipse.Stroke>
         </Ellipse>
         <Ellipse x:Name="drop4"
                  Width="6"
                  HorizontalAlignment="Center"
                  RenderTransformOrigin="0.5,0.5"
                  VerticalAlignment="Center"
                  Height="6"
                  Opacity="0">
            <Ellipse.RenderTransform>
               <TranslateTransform />
            </Ellipse.RenderTransform>
            <Ellipse.Fill>
               <RadialGradientBrush GradientOrigin="0.12,0.725"
                                    RadiusX="0.51"
                                    RadiusY="0.51">
                  <GradientStop Offset="0" />
                  <GradientStop Offset="1"
                                Color="#3FFFFFFF" />
               </RadialGradientBrush>
            </Ellipse.Fill>
            <Ellipse.Stroke>
               <LinearGradientBrush EndPoint="1.011,0.574"
                                    StartPoint="0.001,0.73">
                  <GradientStop Color="#7FFFFFFF"
                                Offset="0" />
                  <GradientStop Offset="1" />
               </LinearGradientBrush>
            </Ellipse.Stroke>
         </Ellipse>
      </Grid>

      <ControlTemplate.Triggers>
         <EventTrigger RoutedEvent="ContentControl.MouseLeftButtonDown">
            <BeginStoryboard>
               <Storyboard>

                  <BooleanAnimationUsingKeyFrames BeginTime="00:00:00"
                                                  Storyboard.TargetProperty="(UIElement.IsHitTestVisible)">
                     <DiscreteBooleanKeyFrame KeyTime="00:00:00"
                                              Value="False" />
                     <DiscreteBooleanKeyFrame KeyTime="00:05:00"
                                              Value="True" />
                  </BooleanAnimationUsingKeyFrames>
                  <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                Storyboard.TargetName="main"
                                                Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                     <LinearColorKeyFrame KeyTime="00:00:00.05"
                                          Value="#7FFFFFFF" />
                     <LinearColorKeyFrame KeyTime="00:00:00.14"
                                          Value="Transparent" />
                     <LinearColorKeyFrame KeyTime="00:04:59.9"
                                          Value="Transparent" />
                     <LinearColorKeyFrame KeyTime="00:05:00"
                                          Value="#3FFFFFFF" />
                  </ColorAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="main"
                                                 Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00.05"
                                           Value="0.85" />
                     <LinearDoubleKeyFrame KeyTime="00:04:59.9"
                                           Value="0.85" />
                     <LinearDoubleKeyFrame KeyTime="00:05:00"
                                           Value="0" />
                  </DoubleAnimationUsingKeyFrames>
                  <PointAnimationUsingKeyFrames BeginTime="00:00:00"
                                                Storyboard.TargetName="main"
                                                Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.StartPoint)">
                     <LinearPointKeyFrame KeyTime="00:00:00.05"
                                          Value="0.001,0.73" />
                     <LinearPointKeyFrame KeyTime="00:00:00.1"
                                          Value="0.649,-0.186" />
                     <LinearPointKeyFrame KeyTime="00:00:00.14"
                                          Value="0.3161,0.6263" />
                     <LinearPointKeyFrame KeyTime="00:00:00.15"
                                          Value="1.625,0.196" />
                     <LinearPointKeyFrame KeyTime="00:00:00.2"
                                          Value="1.369,0.28" />
                     <LinearPointKeyFrame KeyTime="00:04:59.9"
                                          Value="1.369,0.28" />
                     <LinearPointKeyFrame KeyTime="00:05:00"
                                          Value="0.001,0.73" />
                  </PointAnimationUsingKeyFrames>
                  <PointAnimationUsingKeyFrames BeginTime="00:00:00"
                                                Storyboard.TargetName="main"
                                                Storyboard.TargetProperty="(Shape.Stroke).(LinearGradientBrush.EndPoint)">
                     <LinearPointKeyFrame KeyTime="00:00:00.05"
                                          Value="1.011,0.574" />
                     <LinearPointKeyFrame KeyTime="00:00:00.2"
                                          Value="1.013,0.354" />
                     <LinearPointKeyFrame KeyTime="00:04:59.9"
                                          Value="1.013,0.354" />
                     <LinearPointKeyFrame KeyTime="00:05:00"
                                          Value="1.011,0.574" />
                  </PointAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="main"
                                                 Storyboard.TargetProperty="(UIElement.Opacity)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00.0"
                                           Value="1" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.1"
                                           Value="0.33" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:04:59.9"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:05:00"
                                           Value="1" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop1"
                                                 Storyboard.TargetProperty="(UIElement.Opacity)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.24"
                                           Value="1" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.6"
                                           Value="0" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop1"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.24"
                                           Value="3.375" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.6"
                                           Value="18.9375" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop1"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.24"
                                           Value="-12" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.6"
                                           Value="-2.625" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop2"
                                                 Storyboard.TargetProperty="(UIElement.Opacity)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="1" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.5"
                                           Value="0" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop2"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="-11.0625" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.5"
                                           Value="-25.5" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop2"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="-11.0625" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.5"
                                           Value="-10.5" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop3"
                                                 Storyboard.TargetProperty="(UIElement.Opacity)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.28"
                                           Value="1" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.7"
                                           Value="0" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop3"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.28"
                                           Value="9.375" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.7"
                                           Value="18.75" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop3"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.28"
                                           Value="-12.1875" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.7"
                                           Value="-2.25" />

                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop4"
                                                 Storyboard.TargetProperty="(UIElement.Opacity)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="1" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.7"
                                           Value="0" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop4"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="-1" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.7"
                                           Value="-55" />
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                 Storyboard.TargetName="drop4"
                                                 Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)">
                     <LinearDoubleKeyFrame KeyTime="00:00:00"
                                           Value="0" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.2"
                                           Value="-30" />
                     <LinearDoubleKeyFrame KeyTime="00:00:00.7"
                                           Value="-20" />
                  </DoubleAnimationUsingKeyFrames>
               </Storyboard>
            </BeginStoryboard>
         </EventTrigger>
      </ControlTemplate.Triggers>

   </ControlTemplate>

   <!--**************************
    * TEMPLATE: ScrollTip
    ************************** -->
   <ControlTemplate x:Key="scrollTipTemplate"
                    TargetType="{x:Type local:ScrollTip}">

      <Grid VerticalAlignment="{TemplateBinding VerticalAlignment}"
            HorizontalAlignment="{TemplateBinding HorizontalAlignment}">

         <Border BorderThickness="1,1,1,1"
                 BorderBrush="{TemplateBinding BorderBrush}"
                 Background="{TemplateBinding Background}"
                 CornerRadius="8" />

         <Border BorderThickness="1"
                 BorderBrush="{StaticResource basicBlackBorderBrush}"
                 CornerRadius="10">
            <Border BorderThickness="1"
                    BorderBrush="{StaticResource basicWhiteBorderBrush}"
                    CornerRadius="7" />
         </Border>

         <ContentPresenter VerticalAlignment="Center"
                           HorizontalAlignment="Right"
                           Margin="10"
                           TextElement.Foreground="{TemplateBinding TextElement.Foreground}"
                           Content="{TemplateBinding Content}"
                           ContentTemplate="{TemplateBinding ContentTemplate}"
                           ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />

      </Grid>

   </ControlTemplate>

</ResourceDictionary>
